<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>unused</title>
    <style>
      html, body, #display {
        height: 100%;
        background: transparent;
      }
      body {
        margin: 0;
      }
      #display {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 100px;
        color: grey;
      }
    </style>
  </head>
  <body>
    <div id="display">
      yeah
    </div>
    <script>
      onmessage = event => {
        let message = event.data.pluginParent;
        if(message) {
          switch(message.cause) {
            case "callback":
              return handleEvents(message.cargo);
            case "cleanup":
              return stop();
            default:
          }
        }
      };
      
      function stop() {
        alert("stopped");
      }
      
      function handleEvents(cargo) {
        switch (cargo.id) {
          case "myha":
            switch (cargo.event) {
              case "click":
                alert("Yeha? My germane value is \"" + cargo.value + "\".");
                break;
              default:
            }
            break;
          default:
        }
      }
    </script>
  </body>
</html>